All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.util.EndianOrder
java.lang.Object
|
+----quicktime.util.EndianOrder
- public final class EndianOrder
- extends Object
The endian methods in this class are context sensitive, in that the big-endian methods
will only flip if the current platform is little endian and the little-endian methods
will only flip if the current platform is big endian.
The names of the methods are provided as a means of documenting the usage of the method
itself. To operate as specified they rely upon the application correctly providing the
expected endian-ordered number to the method. Thus, the flipNativeToBigEndian and
flipBigEndianToNative will both flip when executed on a little-endian architecture
but the methods are unable to determine if the argument is actually (in this
case) in native little-endian order or big endian order. The application itself must
ensure that the provided argument is correct for these methods to return
their exepcted result.
-
flipBigEndianToNative(Object, int, EndianDescriptor)
- This will flip, iff the current runtime architecture
is little endian, the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor.
-
flipBigEndianToNative(Object, int, Object, int, EndianDescriptor)
- This will flip, iff the current runtime architecture
is little endian, the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor and copy these flipped values to the destination object.
-
flipBigEndianToNative16(short)
- This will flip the endian order of a 16bit value iff the current runtime architecture
is little endian, otherwise the returned value is the same as the supplied value.
-
flipBigEndianToNative32(int)
- This will flip the endian order of a 32bit value iff the current runtime architecture
is little endian, otherwise the returned value is the same as the supplied value.
-
flipBigEndianToNative64(long)
- This will flip the endian order of a 64bit value iff the current runtime architecture
is little endian, otherwise the returned value is the same as the supplied value.
-
flipLittleEndianToNative(Object, int, EndianDescriptor)
- This will flip, iff the current runtime architecture
is big endian, the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor.
-
flipLittleEndianToNative(Object, int, Object, int, EndianDescriptor)
- This will flip, iff the current runtime architecture
is big endian, the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor and copy these flipped values to the destination object.
-
flipLittleEndianToNative16(short)
- This will flip the endian order of a 16bit value iff the current runtime architecture
is big endian, otherwise the returned value is the same as the supplied value.
-
flipLittleEndianToNative32(int)
- This will flip the endian order of a 32bit value iff the current runtime architecture
is big endian, otherwise the returned value is the same as the supplied value.
-
flipLittleEndianToNative64(long)
- This will flip the endian order of a 64bit value iff the current runtime architecture
is big endian, otherwise the returned value is the same as the supplied value.
-
flipNativeToBigEndian(Object, int, EndianDescriptor)
- This will flip iff the current runtime architecture
is little endian the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor.
-
flipNativeToBigEndian(Object, int, Object, int, EndianDescriptor)
- This will flip, iff the current runtime architecture
is little endian, the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor and copy these flipped values to the destination object.
-
flipNativeToBigEndian16(short)
- This will flip the endian order of a 16bit value iff the current runtime architecture
is little endian, otherwise the returned value is the same as the supplied value.
-
flipNativeToBigEndian32(int)
- This will flip the endian order of a 32bit value iff the current runtime architecture
is little endian, otherwise the returned value is the same as the supplied value.
-
flipNativeToBigEndian64(long)
- This will flip the endian order of a 64bit value iff the current runtime architecture
is little endian, otherwise the returned value is the same as the supplied value.
-
flipNativeToLittleEndian(Object, int, EndianDescriptor)
- This will flip, iff the current runtime architecture
is big endian, the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor.
-
flipNativeToLittleEndian(Object, int, Object, int, EndianDescriptor)
- This will flip, iff the current runtime architecture
is big endian, the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor and copy these flipped values to the destination object.
-
flipNativeToLittleEndian16(short)
- This will flip the endian order of a 16bit value iff the current runtime architecture
is big endian, otherwise the returned value is the same as the supplied value.
-
flipNativeToLittleEndian32(int)
- This will flip the endian order of a 32bit value iff the current runtime architecture
is big endian, otherwise the returned value is the same as the supplied value.
-
flipNativeToLittleEndian64(long)
- This will flip the endian order of a 64bit value iff the current runtime architecture
is big endian, otherwise the returned value is the same as the supplied value.
-
isNativeBigEndian()
- Returns true if the current runtime architecture is big endian.
-
isNativeLittleEndian()
- Returns true if the current runtime architecture is little endian.
isNativeLittleEndian
public static boolean isNativeLittleEndian()
- Returns true if the current runtime architecture is little endian.
- Returns:
- a boolean
isNativeBigEndian
public static boolean isNativeBigEndian()
- Returns true if the current runtime architecture is big endian.
- Returns:
- a boolean
flipNativeToBigEndian16
public static short flipNativeToBigEndian16(short s)
- This will flip the endian order of a 16bit value iff the current runtime architecture
is little endian, otherwise the returned value is the same as the supplied value.
- Parameters:
- s - the value to flip
- Returns:
- the flipped value if the runtime architecture is little endian, otherwise
the original value
flipBigEndianToNative16
public static short flipBigEndianToNative16(short s)
- This will flip the endian order of a 16bit value iff the current runtime architecture
is little endian, otherwise the returned value is the same as the supplied value.
- Parameters:
- s - the value to flip
- Returns:
- the flipped value if the runtime architecture is little endian, otherwise
the original value
flipNativeToLittleEndian16
public static short flipNativeToLittleEndian16(short s)
- This will flip the endian order of a 16bit value iff the current runtime architecture
is big endian, otherwise the returned value is the same as the supplied value.
- Parameters:
- s - the value to flip
- Returns:
- the flipped value if the runtime architecture is big endian, otherwise
the original value
flipLittleEndianToNative16
public static short flipLittleEndianToNative16(short s)
- This will flip the endian order of a 16bit value iff the current runtime architecture
is big endian, otherwise the returned value is the same as the supplied value.
- Parameters:
- s - the value to flip
- Returns:
- the flipped value if the runtime architecture is big endian, otherwise
the original value
flipNativeToBigEndian32
public static int flipNativeToBigEndian32(int i)
- This will flip the endian order of a 32bit value iff the current runtime architecture
is little endian, otherwise the returned value is the same as the supplied value.
- Parameters:
- i - the value to flip
- Returns:
- the flipped value if the runtime architecture is little endian, otherwise
the original value
flipBigEndianToNative32
public static int flipBigEndianToNative32(int i)
- This will flip the endian order of a 32bit value iff the current runtime architecture
is little endian, otherwise the returned value is the same as the supplied value.
- Parameters:
- i - the value to flip
- Returns:
- the flipped value if the runtime architecture is little endian, otherwise
the original value
flipNativeToLittleEndian32
public static int flipNativeToLittleEndian32(int i)
- This will flip the endian order of a 32bit value iff the current runtime architecture
is big endian, otherwise the returned value is the same as the supplied value.
- Parameters:
- i - the value to flip
- Returns:
- the flipped value if the runtime architecture is big endian, otherwise
the original value
flipLittleEndianToNative32
public static int flipLittleEndianToNative32(int i)
- This will flip the endian order of a 32bit value iff the current runtime architecture
is big endian, otherwise the returned value is the same as the supplied value.
- Parameters:
- i - the value to flip
- Returns:
- the flipped value if the runtime architecture is big endian, otherwise
the original value
flipNativeToBigEndian64
public static long flipNativeToBigEndian64(long l)
- This will flip the endian order of a 64bit value iff the current runtime architecture
is little endian, otherwise the returned value is the same as the supplied value.
- Parameters:
- l - the value to flip
- Returns:
- the flipped value if the runtime architecture is little endian, otherwise
the original value
flipBigEndianToNative64
public static long flipBigEndianToNative64(long l)
- This will flip the endian order of a 64bit value iff the current runtime architecture
is little endian, otherwise the returned value is the same as the supplied value.
- Parameters:
- l - the value to flip
- Returns:
- the flipped value if the runtime architecture is little endian, otherwise
the original value
flipNativeToLittleEndian64
public static long flipNativeToLittleEndian64(long l)
- This will flip the endian order of a 64bit value iff the current runtime architecture
is big endian, otherwise the returned value is the same as the supplied value.
- Parameters:
- l - the value to flip
- Returns:
- the flipped value if the runtime architecture is big endian, otherwise
the original value
flipLittleEndianToNative64
public static long flipLittleEndianToNative64(long l)
- This will flip the endian order of a 64bit value iff the current runtime architecture
is big endian, otherwise the returned value is the same as the supplied value.
- Parameters:
- l - the value to flip
- Returns:
- the flipped value if the runtime architecture is big endian, otherwise
the original value
flipNativeToBigEndian
public static void flipNativeToBigEndian(Object src,
int srcOffset,
EndianDescriptor ed) throws UtilException
- This will flip iff the current runtime architecture
is little endian the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor. The EndianDescriptor will be applied to the src object at the specified (srcOffset)
number of bytes from the beginning of the src object. The flipping is done in place, so the srcObject
will be flipped upon the completion of this method. Any fields that are not described or accounted for
by the EndianDescriptor will not be flipped.
- Parameters:
- src - the object to flip iff the current runtime architecture is little endian
- srcOffset - the number of bytes from the start of the src object that the supplied endian descriptor
will be applied.
- ed - the EndianDescriptor that will describe how the object should be flipped. This may NOT be null.
- See Also:
- EndianOrder
flipBigEndianToNative
public static void flipBigEndianToNative(Object src,
int srcOffset,
EndianDescriptor ed) throws UtilException
- This will flip, iff the current runtime architecture
is little endian, the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor. It the current runtime architecture is big endian the src object is left unchanged.
The EndianDescriptor will be applied to the src object at the specified (srcOffset)
number of bytes from the beginning of the src object. The flipping is done in place, so the srcObject
will be flipped upon the completion of this method. Any fields that are not described or accounted for
by the EndianDescriptor will not be flipped.
- Parameters:
- src - the object to flip iff the current runtime architecture is little endian
- srcOffset - the number of bytes from the start of the src object that the supplied endian descriptor
will be applied.
- ed - the EndianDescriptor that will describe how the object should be flipped. This may NOT be null.
- See Also:
- EndianOrder
flipNativeToLittleEndian
public static void flipNativeToLittleEndian(Object src,
int srcOffset,
EndianDescriptor ed) throws UtilException
- This will flip, iff the current runtime architecture
is big endian, the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor. It the current runtime architecture is little endian the src object is left unchanged.
The EndianDescriptor will be applied to the src object at the specified (srcOffset)
number of bytes from the beginning of the src object. The flipping is done in place, so the srcObject
will be flipped upon the completion of this method. Any fields that are not described or accounted for
by the EndianDescriptor will not be flipped.
- Parameters:
- src - the object to flip iff the current runtime architecture is big endian
- srcOffset - the number of bytes from the start of the src object that the supplied endian descriptor
will be applied.
- ed - the EndianDescriptor that will describe how the object should be flipped. This may NOT be null.
flipLittleEndianToNative
public static void flipLittleEndianToNative(Object src,
int srcOffset,
EndianDescriptor ed) throws UtilException
- This will flip, iff the current runtime architecture
is big endian, the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor. It the current runtime architecture is little endian the src object is left unchanged.
The EndianDescriptor will be applied to the src object at the specified (srcOffset)
number of bytes from the beginning of the src object. The flipping is done in place, so the srcObject
will be flipped upon the completion of this method. Any fields that are not described or accounted for
by the EndianDescriptor will not be flipped.
- Parameters:
- src - the object to flip iff the current runtime architecture is big endian
- srcOffset - the number of bytes from the start of the src object that the supplied endian descriptor
will be applied.
- ed - the EndianDescriptor that will describe how the object should be flipped. This may NOT be null.
flipNativeToBigEndian
public static void flipNativeToBigEndian(Object src,
int srcOffset,
Object dest,
int destOffset,
EndianDescriptor ed) throws UtilException
- This will flip, iff the current runtime architecture
is little endian, the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor and copy these flipped values to the destination object.
It the current runtime architecture is big endian the src object is left unchanged.
The EndianDescriptor will be applied to the src object at the specified (srcOffset)
number of bytes from the beginning of the src object and the flipped values will be copied to the specified
(destOffset) number of bytes into the destination object. Any fields that are not described or accounted for
by the EndianDescriptor will not be flipped or copied.
- Parameters:
- src - the object to flip iff the current runtime architecture is little endian
- srcOffset - the number of bytes from the start of the src object that the supplied endian descriptor
will be applied.
- dest - the object that will be the flipped version of the source object.
- destOffset - the number of bytes from the start of the dest object that the flipped values will be copied too.
- ed - the EndianDescriptor that will describe how the object should be flipped. This may NOT be null.
flipBigEndianToNative
public static void flipBigEndianToNative(Object src,
int srcOffset,
Object dest,
int destOffset,
EndianDescriptor ed) throws UtilException
- This will flip, iff the current runtime architecture
is little endian, the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor and copy these flipped values to the destination object.
It the current runtime architecture is big endian the src object is left unchanged.
The EndianDescriptor will be applied to the src object at the specified (srcOffset)
number of bytes from the beginning of the src object and the flipped values will be copied to the specified
(destOffset) number of bytes into the destination object. Any fields that are not described or accounted for
by the EndianDescriptor will not be flipped or copied.
- Parameters:
- src - the object to flip iff the current runtime architecture is little endian
- srcOffset - the number of bytes from the start of the src object that the supplied endian descriptor
will be applied.
- dest - the object that will be the flipped version of the source object.
- destOffset - the number of bytes from the start of the dest object that the flipped values will be copied too.
- ed - the EndianDescriptor that will describe how the object should be flipped. This may NOT be null.
flipNativeToLittleEndian
public static void flipNativeToLittleEndian(Object src,
int srcOffset,
Object dest,
int destOffset,
EndianDescriptor ed) throws UtilException
- This will flip, iff the current runtime architecture
is big endian, the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor and copy these flipped values to the destination object.
It the current runtime architecture is little endian the src object is left unchanged.
The EndianDescriptor will be applied to the src object at the specified (srcOffset)
number of bytes from the beginning of the src object and the flipped values will be copied to the specified
(destOffset) number of bytes into the destination object. Any fields that are not described or accounted for
by the EndianDescriptor will not be flipped or copied.
- Parameters:
- src - the object to flip iff the current runtime architecture is big endian
- srcOffset - the number of bytes from the start of the src object that the supplied endian descriptor
will be applied.
- dest - the object that will be the flipped version of the source object.
- destOffset - the number of bytes from the start of the dest object that the flipped values will be copied too.
- ed - the EndianDescriptor that will describe how the object should be flipped. This may NOT be null.
flipLittleEndianToNative
public static void flipLittleEndianToNative(Object src,
int srcOffset,
Object dest,
int destOffset,
EndianDescriptor ed) throws UtilException
- This will flip, iff the current runtime architecture
is big endian, the supplied src object's fields according to the characteristics of the supplied
EndianDescriptor and copy these flipped values to the destination object.
It the current runtime architecture is little endian the src object is left unchanged.
The EndianDescriptor will be applied to the src object at the specified (srcOffset)
number of bytes from the beginning of the src object and the flipped values will be copied to the specified
(destOffset) number of bytes into the destination object. Any fields that are not described or accounted for
by the EndianDescriptor will not be flipped or copied.
- Parameters:
- src - the object to flip iff the current runtime architecture is big endian
- srcOffset - the number of bytes from the start of the src object that the supplied endian descriptor
will be applied.
- dest - the object that will be the flipped version of the source object.
- destOffset - the number of bytes from the start of the dest object that the flipped values will be copied too.
- ed - the EndianDescriptor that will describe how the object should be flipped. This may NOT be null.
All Packages Class Hierarchy This Package Previous Next Index